/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author lomanda
 */
@Entity
@Table(name = "reuniao")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Reuniao.findAll", query = "SELECT r FROM Reuniao r"),
    @NamedQuery(name = "Reuniao.findByIdReuniao", query = "SELECT r FROM Reuniao r WHERE r.idReuniao = :idReuniao"),
    @NamedQuery(name = "Reuniao.findByAssunto", query = "SELECT r FROM Reuniao r WHERE r.assunto = :assunto"),
    @NamedQuery(name = "Reuniao.findByDescricao", query = "SELECT r FROM Reuniao r WHERE r.descricao = :descricao"),
    @NamedQuery(name = "Reuniao.findByDataRealizacao", query = "SELECT r FROM Reuniao r WHERE r.dataRealizacao = :dataRealizacao"),
    @NamedQuery(name = "Reuniao.findByLocalizacao", query = "SELECT r FROM Reuniao r WHERE r.localizacao = :localizacao"),
    @NamedQuery(name = "Reuniao.findByHoraInicio", query = "SELECT r FROM Reuniao r WHERE r.horaInicio = :horaInicio"),
    @NamedQuery(name = "Reuniao.findByHoraFim", query = "SELECT r FROM Reuniao r WHERE r.horaFim = :horaFim")})
public class Reuniao implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "dataRealizacao")
    @Temporal(TemporalType.DATE)
    private Date dataRealizacao;
    @Basic(optional = false)
    @NotNull
    @Column(name = "horaInicio")
    @Temporal(TemporalType.TIME)
    private Date horaInicio;
    @Basic(optional = false)
    @NotNull
    @Column(name = "horaFim")
    @Temporal(TemporalType.TIME)
    private Date horaFim;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idReuniao")
    private Integer idReuniao;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "assunto")
    private String assunto;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 300)
    @Column(name = "descricao")
    private String descricao;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "localizacao")
    private String localizacao;

    public Reuniao() {
    }

    public Reuniao(Integer idReuniao) {
        this.idReuniao = idReuniao;
    }

    public Reuniao(Integer idReuniao, String assunto, String descricao, Date dataRealizacao, String localizacao, Date horaInicio, Date horaFim) {
        this.idReuniao = idReuniao;
        this.assunto = assunto;
        this.descricao = descricao;
        this.dataRealizacao = dataRealizacao;
        this.localizacao = localizacao;
        this.horaInicio = horaInicio;
        this.horaFim = horaFim;
    }

    public Integer getIdReuniao() {
        return idReuniao;
    }

    public void setIdReuniao(Integer idReuniao) {
        this.idReuniao = idReuniao;
    }

    public String getAssunto() {
        return assunto;
    }

    public void setAssunto(String assunto) {
        this.assunto = assunto;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public String getLocalizacao() {
        return localizacao;
    }

    public void setLocalizacao(String localizacao) {
        this.localizacao = localizacao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idReuniao != null ? idReuniao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reuniao)) {
            return false;
        }
        Reuniao other = (Reuniao) object;
        if ((this.idReuniao == null && other.idReuniao != null) || (this.idReuniao != null && !this.idReuniao.equals(other.idReuniao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Reuniao[ idReuniao=" + idReuniao + " ]";
    }

    public Date getDataRealizacao() {
        return dataRealizacao;
    }

    public void setDataRealizacao(Date dataRealizacao) {
        this.dataRealizacao = dataRealizacao;
    }

    public Date getHoraInicio() {
        return horaInicio;
    }

    public void setHoraInicio(Date horaInicio) {
        this.horaInicio = horaInicio;
    }

    public Date getHoraFim() {
        return horaFim;
    }

    public void setHoraFim(Date horaFim) {
        this.horaFim = horaFim;
    }
    
}
